home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Mark Pilgrim / Ghost 1.0 / source / Ghost ƒ / Ghost code / ghost help.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-30  |  7.6 KB  |  222 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        ghost help.c
  4.  
  5. Purpose:    This module handles displaying the different help windows.
  6.  
  7.  
  8. Ghost -=- a classic word-building challenge
  9. Copyright (C) 1993 Mark Pilgrim
  10.  
  11. This program is free software; you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation; either version 2 of the License, or
  14. (at your option) any later version.
  15.  
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. GNU General Public License for more details.
  20.  
  21. You should have received a copy of the GNU General Public License
  22. along with this program in a file named "GNU General Public License".
  23. If not, write to the Free Software Foundation, 675 Mass Ave,
  24. Cambridge, MA 02139, USA.
  25.  
  26. \**********************************************************************/
  27.  
  28. #include "ghost help.h"
  29.  
  30. void DrawHelp(int whichHelp)
  31. {
  32.     GrafPtr        curPort;
  33.     
  34.     GetPort(&curPort);
  35.     EraseRect(&(curPort->portRect));
  36.  
  37.     MoveTo(10,15);
  38.     TextFont(3);
  39.     TextSize(9);
  40.     switch (whichHelp)
  41.     {
  42.         case 0:
  43.             DrawHelpPlay();
  44.             break;
  45.         case 1:
  46.             DrawHelpOptions();
  47.             break;
  48.         case 2:
  49.             DrawHelpCopyright();
  50.             break;
  51.         case 3:
  52.             DrawHelpContact();
  53.             break;
  54.         case 4:
  55.             DrawHelpFAQ();
  56.             break;
  57.     }
  58. }
  59.  
  60. void DrawHelpPlay(void)
  61. {
  62.     DrawString("\pGhost is a classic word-building game for 2 or more players.");
  63.     MoveTo(10,27);
  64.     DrawString("\pPlayers take turns adding a letter to a word.  Whoever adds");
  65.     MoveTo(10,39);
  66.     DrawString("\pthe letter that finishes the word loses the round and gets a");
  67.     MoveTo(10,51);
  68.     DrawString("\pletter of the word “ghost” added to their score.  Once a player");
  69.     MoveTo(10,63);
  70.     DrawString("\ploses five rounds, they are a “ghost” and are out of the game!");
  71.     MoveTo(10,87);
  72.     DrawString("\pBluffing: if you don’t know what letter to add, try bluffing and");
  73.     MoveTo(10,99);
  74.     DrawString("\ppicking a letter that seems reasonable.  The current player");
  75.     MoveTo(10,111);
  76.     DrawString("\palways has the option to challenge (“Challenge word” under");
  77.     MoveTo(10,123);
  78.     DrawString("\pthe “Options” menu), and the dictionary will be consulted to");
  79.     MoveTo(10,135);
  80.     DrawString("\psee if any words exist that start with that series of letters.");
  81.     MoveTo(10,147);
  82.     DrawString("\pIf so, the player who placed the challenge loses the round;");
  83.     MoveTo(10,159);
  84.     DrawString("\pif not, the player who bluffed loses the round!");
  85.     MoveTo(10,171);
  86.     MoveTo(10,183);
  87.     DrawString("\pHint: the computer players do occasionally bluff; don’t be");
  88.     MoveTo(10,195);
  89.     DrawString("\pafraid to challenge them!");
  90. }
  91.  
  92. void DrawHelpOptions(void)
  93. {
  94.     DrawString("\pYou can play Ghost against as many as five computer players,");
  95.     MoveTo(10,27);
  96.     DrawString("\pwith as many as five human players as well.  Set the number");
  97.     MoveTo(10,39);
  98.     DrawString("\pof computer players under “Computer players” before you");
  99.     MoveTo(10,51);
  100.     DrawString("\pstart a new game.  (The human players each select their names");
  101.     MoveTo(10,63);
  102.     DrawString("\pand icons individually once you select “New game”.)");
  103.     MoveTo(10,87);
  104.     DrawString("\pThe computer players are all equally intelligent; you can");
  105.     MoveTo(10,99);
  106.     DrawString("\pcontrol this intelligence level under “Level of play” before");
  107.     MoveTo(10,111);
  108.     DrawString("\pthe game starts.  “Easy” means the computer players are");
  109.     MoveTo(10,123);
  110.     DrawString("\pfairly stupid; “difficult” means they’re, well, difficult.");
  111.     MoveTo(10,147);
  112.     DrawString("\pThe “Dictionary” menu controls both the dictionary which the");
  113.     MoveTo(10,159);
  114.     DrawString("\pcomputer players use to strategically select letters, and the");
  115.     MoveTo(10,171);
  116.     DrawString("\preference used to resolve challenges.  [Heed the names!  -MP]");
  117.     MoveTo(10,195);
  118.     DrawString("\p“Game speed” controls how fast the game progresses.");
  119. }
  120.  
  121. void DrawHelpCopyright(void)
  122. {
  123.     DrawString("\pGhost is copyright ©1993 Mark Pilgrim.  This program is");
  124.     MoveTo(10,27);
  125.     DrawString("\pcompletely free; you can redistribute it and/or modify it");
  126.     MoveTo(10,39);
  127.     DrawString("\punder the terms of the GNU General Public License as published");
  128.     MoveTo(10,51);
  129.     DrawString("\pby the Free Software Foundation; either version 2 of the");
  130.     MoveTo(10,63);
  131.     DrawString("\pLicense, or (at your option) any later version.");
  132.     MoveTo(10,87);
  133.     DrawString("\pGhost is distributed in the hope that it will be useful,");
  134.     MoveTo(10,99);
  135.     DrawString("\pbut WITHOUT ANY WARRANTY; without even the implied");
  136.     MoveTo(10,111);
  137.     DrawString("\pwarranty of MERCHANTABILITY or FITNESS FOR A");
  138.     MoveTo(10,123);
  139.     DrawString("\pPARTICULAR PURPOSE.  See the GNU General Public License");
  140.     MoveTo(10,135);
  141.     DrawString("\pfor more details.");
  142.     MoveTo(10,159);
  143.     DrawString("\pYou should have received a copy of the GNU General Public");
  144.     MoveTo(10,171);
  145.     DrawString("\pLicense along with this program; if not, write to the Free");
  146.     MoveTo(10,183);
  147.     DrawString("\pSoftware Foundation, Inc., 675 Mass Ave, Cambridge, MA,");
  148.     MoveTo(10,195);
  149.     DrawString("\p02139, USA.");
  150. }
  151.  
  152. void DrawHelpContact(void)
  153. {
  154.     DrawString("\pAll Macintosh users should feel free to contact me for any of");
  155.     MoveTo(10,27);
  156.     DrawString("\pthe following reasons: reporting bugs or suggestions about");
  157.     MoveTo(10,39);
  158.     DrawString("\pGhost or any other program I’ve written; discussing the");
  159.     MoveTo(10,51);
  160.     DrawString("\ppossibility of collaborating on future programming projects;");
  161.     MoveTo(10,63);
  162.     DrawString("\pdiscussing the virus I wrote and released (MBDF-A); discussing");
  163.     MoveTo(10,75);
  164.     DrawString("\pways to keep potential virus-writers from becoming actual");
  165.     MoveTo(10,87);
  166.     DrawString("\pvirus-writers; discussing techniques for really good backrubs.");
  167.     MoveTo(10,111);
  168.     DrawString("\pMy e-mail address is f8dy@netaxs.com.  To send me e-mail");
  169.     MoveTo(10,123);
  170.     DrawString("\panonymously, mail to an48382@anon.penet.fi.  (Due to the");
  171.     MoveTo(10,135);
  172.     DrawString("\pdouble-blind system, you will be allocated an anonymous I.D.");
  173.     MoveTo(10,147);
  174.     DrawString("\pwhich will keep your identity hidden.)  To send me encrypted");
  175.     MoveTo(10,159);
  176.     DrawString("\pmail, e-mail me requesting my PGP 2.2 public key.  If you do");
  177.     MoveTo(10,171);
  178.     DrawString("\pnot have e-mail access, my home address is 1130 Radnor Hill");
  179.     MoveTo(10,183);
  180.     DrawString("\pRoad, Wayne PA, 19087-2203, USA.  Obviously, it will take");
  181.     MoveTo(10,195);
  182.     DrawString("\pme much longer to reply to snail-mail; use it as a last resort.");
  183. }
  184.  
  185. void DrawHelpFAQ(void)
  186. {
  187.     MoveTo(5,15);
  188.     TextFace(bold);
  189.     DrawString("\pWhy is my copy of Ghost registered to Bob?");
  190.     MoveTo(10,27);
  191.     TextFace(0);
  192.     DrawString("\pThat’s the default name the program uses if you don’t enter");
  193.     MoveTo(10,39);
  194.     DrawString("\pyour name in the personalization dialog box.");
  195.     MoveTo(5,63);
  196.     TextFace(bold);
  197.     DrawString("\pHow do I re-personalize my copy of Ghost?");
  198.     MoveTo(10,75);
  199.     TextFace(0);
  200.     DrawString("\pDuplicate it or copy it to another disk, then run the copy.");
  201.     MoveTo(10, 87);
  202.     DrawString("\p(Or just trash “Ghost prefs” in your system folder.)");
  203.     MoveTo(5,111);
  204.     TextFace(bold);
  205.     DrawString("\pWhy all the fuss over the MBDF-A virus?");
  206.     MoveTo(10,123);
  207.     TextFace(0);
  208.     DrawString("\pI’m trying to put back into the Macintosh community as much");
  209.     MoveTo(10,135);
  210.     DrawString("\pas I took out of it.  When I reach the break-even point, I’ll");
  211.     MoveTo(10,147);
  212.     DrawString("\plet you know.");
  213.     MoveTo(5,171);
  214.     TextFace(bold);
  215.     DrawString("\pHow does MSG enhance the flavor of my Macintosh?");
  216.     MoveTo(10,183);
  217.     TextFace(0);
  218.     DrawString("\pWe try to think of things that no other Macintosh program");
  219.     MoveTo(10,195);
  220.     DrawString("\pdoes, and then we do them.  Any suggestions?");
  221. }
  222.